<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var o = {
            extend:function(){
                for (var i = 0; i<arguments.length;i++){
                    for(var k in arguments[i]){
                        this[k]=arguments[i][k];
                    }
                }
            }
        }
        o.extend(
            {name:'zs',age:18},
            {
                sayHi:function(){
                console.log('你好啊');
                
            },
            walk:function(){
                console.log('行走');
                
            }
            }
        )
        console.log(o);
        o.walk();
    </script>
</body>
</html>